﻿<%@ Page  validateRequest="false" Title="Добавить новое место" Language="C#" MasterPageFile="~/Content.Master" AutoEventWireup="true" CodeBehind="AddPlace.aspx.cs" Inherits="MusaDor.Publisher.AddPlace" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <link rel="stylesheet" href="../Scripts/chosen-master/chosen/chosen.css" />
    <script type="text/javascript" src="../Scripts/jquery-1.4.1.js"></script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
        <div id="RightSide">
            <table class="table">
                <tr>
                    <td class="leftColumn">
                        Title*:
                    </td>
                </tr>
                <tr>
                    <td class="leftColumn">
                        <asp:TextBox CSSclass="headerinput" ID="TextBoxTitle" MaxLength="256" runat="server"></asp:TextBox>
                    </td>
                    <td class="rightColumn">
                        <asp:RequiredFieldValidator ID="RequiredFieldValidatorTitle" runat="server" ErrorMessage="This field is required" ControlToValidate="TextBoxTitle" ForeColor="#FF3300" CssClass="Validation"></asp:RequiredFieldValidator>                    
                    </td>
                </tr>
                <tr>
                    <td class="leftColumn">
                        <br />
                        Short description*:
                    </td>
                </tr>
                <tr>
                    <td class="leftColumn">
                        <asp:TextBox CSSclass="headerinput" ID="description" MaxLength="256" runat="server"></asp:TextBox>                    
                    </td>
                </tr>
                <tr>
                    <td class="leftColumn">
                        <br />
                        Latitude*:
                    </td>
                </tr>
                <tr>
                    <td class="leftColumn">
                        <asp:TextBox CSSclass="headerinput" ID="latitude" MaxLength="256" runat="server" onkeyup="return coordinates(this);" onchange="return coordinates(this);"></asp:TextBox>
                    </td>
                    <td class="rightColumn">
                        <asp:RequiredFieldValidator ID="latitudeFieldValidator" runat="server" ErrorMessage="This field is required" ControlToValidate="latitude" ForeColor="#FF3300" CssClass="Validation"></asp:RequiredFieldValidator>                    
                    </td>
                </tr>
                <tr>
                    <td class="leftColumn">
                        <br />
                        Longitude*:
                    </td>
                </tr>
                <tr>
                    <td class="leftColumn">
                        <asp:TextBox CSSclass="headerinput" ID="longitude" MaxLength="256" runat="server" onkeyup="return coordinates(this);" onchange="return coordinates(this);"></asp:TextBox>
                    </td>
                    <td class="rightColumn">
                        <asp:RequiredFieldValidator ID="longitudeFieldValidator" runat="server" ErrorMessage="This field is required" ControlToValidate="longitude" ForeColor="#FF3300" CssClass="Validation"></asp:RequiredFieldValidator>                    
                    </td>
                </tr>

                <tr>
                    <td>
                        <br />
                        Image (miniature | 200x200 | .jpg)*:
                    </td>
                </tr>
                <tr>
                    <td>
                        <asp:FileUpload ID="PreviewImageUpload" runat="server" CssClass="UploadPhoto"/>
                    </td>
                    <td class="rightColumn">
                        <asp:Label ID="PreviewImageUploadStatus" runat="server" Text=" "></asp:Label>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidatorPreviewImage" runat="server"  ErrorMessage="Select a miniature" ControlToValidate="PreviewImageUpload"  ForeColor="#FF3300"></asp:RequiredFieldValidator>                    
                    </td>
                </tr>
                <tr>
                    <td >
                        <br />
                        Image (full | .jpg)*:
                    </td>
                </tr>
                <tr>
                    <td>
                        <asp:FileUpload ID="FullImageUpload" runat="server" BackColor="White" 
                            CssClass="UploadPhoto"/>                        
                    </td>
                    <td class="rightColumn">
                        <asp:Label ID="FullImageUploadStatus" runat="server" Text=" " CssClass="Error"></asp:Label>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidatorFullImage" runat="server" ErrorMessage="Select a full image" ControlToValidate="FullImageUpload" ForeColor="#FF3300"></asp:RequiredFieldValidator>                                        
                    </td>
                </tr>
                <tr>
                    <td>
                        <br />
                        Full description*:
                    </td>
                    <td class="rightColumn">
                        <br />
                        <asp:RequiredFieldValidator ID="RequiredFieldValidatorArticle" runat="server" ErrorMessage="This field is required" ControlToValidate="Article" ForeColor="#FF3300"></asp:RequiredFieldValidator>
                    </td>
                </tr>
            </table>
            <script type="text/javascript" src="../Scripts/tinymce/tinymce.min.js"></script>
            <script type="text/javascript">
                tinymce.init({
                    selector: 'textarea',
                    theme: "modern"
                }); 
            </script>
            <div class="ArticleContainer">
                <asp:TextBox ID="Article" runat="server" TextMode="MultiLine" CssClass="Article"></asp:TextBox>            
            </div>	
            <br />
            <div class="bp">
                <asp:Button ID="Send" runat="server" Text="Send" CssClass="Send"  PostBackUrl="#Successfully" onclick="Send_Click"/>            
            </div>
        </div>
<script type="text/javascript">
function coordinates(input) {
    input.value = input.value.replace(/[^\d\.]/g, '');
};
</script>
</asp:Content>

